package com.ruoyi.project.data.domain;

import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.project.system.domain.SysDept;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * 场站信息对象 weight_station
 *
 * @author ruoyi
 * @date 2020-03-21
 */
public class WeightStation extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 场站名称 */
    @Excel(name = "场站名称")
    private String stationName;

    /** 场站编号 */
    @Excel(name = "场站编号")
    private String stationCode;

    /** 联系人 */
    @Excel(name = "联系人")
    private String contacts;

    /** 联系电话 */
    @Excel(name = "联系电话")
    private String telephone;

    /** 地址 */
    @Excel(name = "地址")
    private String address;

    /** 管辖单位 */
    @Excel(name = "管辖单位")
    private String jurisdictionUnit;
    // 管辖单位名称
    private String jurisdictionUnitName;

    /** 属地 */
    private String town;
    // 属地名称
    private String townName;
    /** 运单所有权限（0-否；1-是） */
    private String isAllPermissions;

    /** 删除标志位 */
    private String delFlag;

    /** 创建人 */
    private String createId;

    /** 更新人 */
    private String updateId;

    private String jkPassword;
    /** 图章地址 */
    private String sealPath;

    /** 是否出厂检查（1-是；0-否） */
    private String leaveCheck;

    /** 是否有特种设备（1-是；0-否） */
    private String isSpecialEquipment;

    /** 门头照片 */
    private String doorwayPhotoPath;

    /** 办公面积 */
    private String officeArea;

    /** 仓库面积 */
    private String warehouseArea;

    /** 仓库照片 */
    private String warehousePhotoPath;

    /** 经度 */
    private String longitude;
    /** 纬度 */
    private String latitude;
    /** 运单数 */
    private Integer billNum;
    /** 称重总重 */
    private Double weightTotal;
    private SysDept sysDept;

    /** 所属区域 **/
    private  String  areaCode;

    private List<WeightStationCamera> cameraList = new ArrayList<>();
    private String enterMonitor;    // 进场监控
    private String leaveMonitor;    // 出场监控
    private String weightMonitor;    // 称重监控

    private String stationType; //企业类型（1-场站企业;2-混凝土企业;3-港口码头）

    private String supervisionUnit; //监管单位: 1-交通局 2-工信部 3-住建局 4-商务局 5-应急管理局

    /**
     * 企业性质:
     * 1-货源场站 2-港口码头 3-工业企业（钢铁、有色金属） 4-建筑工地
     * 5-混泥土搅拌 6-物资贸易市场 7-矿山（非煤） 8-危化品存储
     * 9-水泥及制品
     */
    private String[] enterpriseType;

    private String enterpriseTypeString;

    private String supervisionUnitForChinese;

    private String enterpriseTypeStringForChinese;


    public String getSupervisionUnitForChinese() {
        return supervisionUnitForChinese;
    }

    public void setSupervisionUnitForChinese(String supervisionUnitForChinese) {
        this.supervisionUnitForChinese = supervisionUnitForChinese;
    }

    public String getEnterpriseTypeStringForChinese() {
        return enterpriseTypeStringForChinese;
    }

    public void setEnterpriseTypeStringForChinese(String enterpriseTypeStringForChinese) {
        this.enterpriseTypeStringForChinese = enterpriseTypeStringForChinese;
    }

    public String getEnterpriseTypeString() {
        return enterpriseTypeString;
    }

    public void setEnterpriseTypeString(String enterpriseTypeString) {
        this.enterpriseTypeString = enterpriseTypeString;
    }

    public String getSupervisionUnit() {
        return supervisionUnit;
    }

    public void setSupervisionUnit(String supervisionUnit) {
        this.supervisionUnit = supervisionUnit;
    }

    public String[] getEnterpriseType() {
        return enterpriseType;
    }

    public void setEnterpriseType(String[] enterpriseType) {
        this.enterpriseType = enterpriseType;
    }

    public String getStationType() {
        return stationType;
    }

    public void setStationType(String stationType) {
        this.stationType = stationType;
    }

    public String getEnterMonitor() {
        return enterMonitor;
    }

    public void setEnterMonitor(String enterMonitor) {
        this.enterMonitor = enterMonitor;
    }

    public String getLeaveMonitor() {
        return leaveMonitor;
    }

    public void setLeaveMonitor(String leaveMonitor) {
        this.leaveMonitor = leaveMonitor;
    }

    public String getWeightMonitor() {
        return weightMonitor;
    }

    public void setWeightMonitor(String weightMonitor) {
        this.weightMonitor = weightMonitor;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setStationName(String stationName)
    {
        this.stationName = stationName;
    }

    public String getStationName()
    {
        return stationName;
    }
    public void setStationCode(String stationCode)
    {
        this.stationCode = stationCode;
    }

    public String getStationCode()
    {
        return stationCode;
    }
    public void setContacts(String contacts)
    {
        this.contacts = contacts;
    }

    public String getContacts()
    {
        return contacts;
    }
    public void setTelephone(String telephone)
    {
        this.telephone = telephone;
    }

    public String getTelephone()
    {
        return telephone;
    }
    public void setAddress(String address)
    {
        this.address = address;
    }

    public String getAddress()
    {
        return address;
    }
    public void setJurisdictionUnit(String jurisdictionUnit)
    {
        this.jurisdictionUnit = jurisdictionUnit;
    }

    public String getJurisdictionUnit()
    {
        return jurisdictionUnit;
    }
    public void setTown(String town)
    {
        this.town = town;
    }

    public String getTown()
    {
        return town;
    }
    public void setIsAllPermissions(String isAllPermissions)
    {
        this.isAllPermissions = isAllPermissions;
    }

    public String getIsAllPermissions()
    {
        return isAllPermissions;
    }
    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }
    public void setCreateId(String createId)
    {
        this.createId = createId;
    }

    public String getCreateId()
    {
        return createId;
    }
    public void setUpdateId(String updateId)
    {
        this.updateId = updateId;
    }

    public String getUpdateId()
    {
        return updateId;
    }

    public String getJkPassword() {
        return jkPassword;
    }

    public void setJkPassword(String jkPassword) {
        this.jkPassword = jkPassword;
    }

    public String getJurisdictionUnitName() {
        return jurisdictionUnitName;
    }

    public void setJurisdictionUnitName(String jurisdictionUnitName) {
        this.jurisdictionUnitName = jurisdictionUnitName;
    }

    public String getTownName() {
        return townName;
    }

    public void setTownName(String townName) {
        this.townName = townName;
    }

    public String getSealPath() {
        return sealPath;
    }

    public void setSealPath(String sealPath) {
        this.sealPath = sealPath;
    }

    public SysDept getSysDept() {
        return sysDept;
    }

    public void setSysDept(SysDept sysDept) {
        this.sysDept = sysDept;
    }

    public String getLeaveCheck() {
        return leaveCheck;
    }

    public void setLeaveCheck(String leaveCheck) {
        this.leaveCheck = leaveCheck;
    }

    public String getIsSpecialEquipment() {
        return isSpecialEquipment;
    }

    public void setIsSpecialEquipment(String isSpecialEquipment) {
        this.isSpecialEquipment = isSpecialEquipment;
    }

    public String getDoorwayPhotoPath() {
        return doorwayPhotoPath;
    }

    public void setDoorwayPhotoPath(String doorwayPhotoPath) {
        this.doorwayPhotoPath = doorwayPhotoPath;
    }

    public String getOfficeArea() {
        return officeArea;
    }

    public void setOfficeArea(String officeArea) {
        this.officeArea = officeArea;
    }

    public String getWarehouseArea() {
        return warehouseArea;
    }

    public void setWarehouseArea(String warehouseArea) {
        this.warehouseArea = warehouseArea;
    }

    public String getWarehousePhotoPath() {
        return warehousePhotoPath;
    }

    public void setWarehousePhotoPath(String warehousePhotoPath) {
        this.warehousePhotoPath = warehousePhotoPath;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public Integer getBillNum() {
        return billNum;
    }

    public void setBillNum(Integer billNum) {
        this.billNum = billNum;
    }

    public Double getWeightTotal() {
        return weightTotal;
    }

    public void setWeightTotal(Double weightTotal) {
        this.weightTotal = weightTotal;
    }

    public List<WeightStationCamera> getCameraList() {
        return cameraList;
    }

    public void setCameraList(List<WeightStationCamera> cameraList) {
        this.cameraList = cameraList;
    }

    public void joinToString(String[] enterpriseType){
        if(enterpriseType!=null && enterpriseType.length>0){
            String str = "";
            for (String type :enterpriseType) {
                str+=type+",";
            }
            str = str.substring(0,str.length()-1);
            this.enterpriseTypeString = str;
        }
    }

    public void splitFromString(String enterpriseTypeString){
        if(StringUtils.isNotNull(enterpriseTypeString) && StringUtils.isNotEmpty(enterpriseTypeString)){
            this.enterpriseType = enterpriseTypeString.split(",");
        }
    }
    public String getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("stationName", getStationName())
            .append("stationCode", getStationCode())
            .append("contacts", getContacts())
            .append("telephone", getTelephone())
            .append("address", getAddress())
            .append("jurisdictionUnit", getJurisdictionUnit())
            .append("town", getTown())
            .append("isAllPermissions", getIsAllPermissions())
            .append("delFlag", getDelFlag())
            .append("createTime", getCreateTime())
            .append("createId", getCreateId())
            .append("updateTime", getUpdateTime())
            .append("updateId", getUpdateId())
            .append("remark", getRemark())
                .append("jkPassword", getJkPassword())
            .toString();
    }
}
